package com.jxaummd.aquaculture.ui.fragment.first.fun;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.widget.Toolbar;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.alibaba.fastjson.JSONObject;
import com.jxaummd.aquaculture.R;
import com.jxaummd.aquaculture.base.BaseBackFragment;
import com.jxaummd.aquaculture.entity.Device;
import com.jxaummd.aquaculture.entity.DeviceInfo;
import com.jxaummd.aquaculture.util.net.RestClient;
import com.jxaummd.aquaculture.util.net.callback.ISuccess;


public class InfoFragment extends BaseBackFragment {
    private String text;

    public static InfoFragment newInstance(String text) {
        Bundle args = new Bundle();
        InfoFragment fragment = new InfoFragment();
        fragment.setArguments(args);
        fragment.text = text;
        return fragment;
    }


    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_device_info, container, false);
        initView(view);
        return view;
    }

    private void initView(final View view) {
        Toolbar toolbar = view.findViewById(R.id.toolbar);
        toolbar.setTitle("设备信息");
        initToolbarNav(toolbar);
        TextView textView = view.findViewById(R.id.fragment_device_info_tv);
        textView.setText(text);
    }

}
